const Router = require('koa-router')
const { UserController } = require('../controllers/user.controller')

const userRoute = new Router({
  prefix: '/user'
})

userRoute.post('/register', UserController.register)
userRoute.get('/profile', UserController.getProfile)
userRoute.get('/:id/profile', UserController.getProfileById)
userRoute.put('/nickname', UserController.changeNickname)
userRoute.put('/avatar', UserController.changeAvatarUrl)
userRoute.put('/signature', UserController.changeSignature)
userRoute.put('/email', UserController.changeEmail)
userRoute.put('/sex', UserController.changeSex)

module.exports = {
  userRoute
}